home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-03-06 | 2.2 KB | 59 lines | [TEXT/GEOL] |
- Item forwarded by A33 to A34
-
- Item 6510304 6-Feb-90 01:03PST
-
- From: CDA0004 VAR Shana Corp, Don Murphy,IVR
-
- To: MACAPP.TECH$ MacApp Technical
-
- Sub: More On UnloadAllSegs
-
- Attn: MacApp Technical
- SentBy: Wayne Malkin
- Date 2/5/90
- Subject More On UnloadAllSegs
- From Wayne Malkin
- To MacApp Technical
-
- Memo Subject:More On UnloadAllSegs
- Hello All,
-
- After some thought, I came to the conclusion that being able to call
- UnloadAllSegs from somewhere besides the main segment is amazingly useful
- stuff.
-
- When opening a document, lots of stuff gets loaded including file system code,
- calculation parser, etc. and I once saw locked code peak at 500k. This is
- partly due to unfinished segmentation, but not much. Of a 750k application,
- I'll bet we can't get the peak code usage below 350k. This doesn't leave much
- for a document on a 1 meg machine.
-
- The problem is that various parts of the document require different bits of
- code to load, and it adds up. It would be great to be able to unload segments
- after reading each part of the document. I am sure there are other places
- where this would be useful too, like printing, when there is slightly less
- memory available.
-
- UnloadAllSegs and the subsequent LoadSeg calls would take quite a bit of time,
- so I would suggest a "UnloadIfLow" call which would check the locked code and
- call UnloadAllSegs if things look tight.
-
- Now for the tricky parts:
-
- If UnloadAllSegs is modified to do a stack crawl and NOT unload segments in
- the call chain, are we guaranteed that this will work? Does MacApp ALWAYS
- create corrent stack frames in its assembler bits? Does the Pascal compiler
- ALWAYS do the same? If not, is there some compiler options we should avoid to
- make sure it does? How about if C code is linked in?
-
- Anything else wrong with the idea? Of course, to work this requires the
- cooperation of the application programmer. If a stack frame is forgotten in
- some assembler routine, the calling routine could get unloaded, at which time
- the memory manager may move or purge it and you end up returning into space.
-
- Any thoughts?
-
- -- Wayne Malkin
-
-
-